{% extends '::base.html.twig' %}

{% block title %}{% trans %}Change Your Password{% endtrans %}{% endblock %}

{% block body %}
<div class="row-fluid whiteWrapper">
    <form class="form-horizontal passwordForm" action="{{ path('user_change_password', {'confirmationCode': user.confirmationCode, 'email': user.email}) }}" method="post">
        <fieldset>
            <legend>{% trans %}Change Your Password{% endtrans %}</legend>
            <hr class="smallHr">

            {% for formError in form.vars.errors %}
            <div class="alert-error alert">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                {{ formError.message }}
            </div>
            {% endfor %}

            <div class="control-group">
                <label class="control-label">{% trans %}Password{% endtrans %}</label>
                <div class="controls">
                    {{ form_widget(form.userPassword.Password, {'attr': {'class': 'input-xlarge', 'placeholder': 'Password' | trans} }) }}
                </div>
            </div>

            {% for formError in form.userPassword.Password.vars.errors %}
            <div class="control-group">
                <div class="alert-error alert">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    {{ formError.message }}
                </div>
            </div>
            {% endfor %}

            <div class="control-group">
                <label class="control-label">{% trans %}ReType Password{% endtrans %}</label>
                <div class="controls">
                    {{ form_widget(form.userPassword.RePassword, {'attr': {'class': 'input-xlarge', 'placeholder': 'Re-enter Password' | trans} }) }}
                </div>
            </div>

            <div class="control-group">
                <div class="controls">
                    {{ form_rest(form) }}
                    <button class="btn blue" type="submit">{% trans %}Save{% endtrans %}</button>
                </div>
            </div>
        </fieldset>
    </form>
</div>
{% endblock %}